import csv
import json
import os
from collections import Counter
t=Counter()
names=['veronicaj_art', 'tiffanyflowers1711', 'oswaldourquizo', 'shelbizleee', 'matthewwesthouse', 'crafty.diply', 'tiedyeskater', '5.minute.recycle', 'mashable', 'jillsejd', 'theemoodyfoody', 'fivefootfeminine', 'melissametrano', 'leztidomrue', 'thenovicechef', 'southern_living', 'heathernitsche', 'bryniebooo', 'spiritedla', 'myracheng', 'robertomartinez265', 'broughsbows_', 'heathersheavenlysweets', 'carmelladandino', 'elliebug_spam', 'krysmay', '180_tiktok', 'ashdonbyszewski', 'moore0098', 'taylorjakubiec', 'official.flakkaa', 'kallmekris', 'heyomacyo', 'sarahduffy0011', 'westbrouck', 'ireallylikeapples', 'bigdripp30', 'djlemay2', 'lia.jakubowski', 'suave_bash', 'landon.kalin', 'typical_democrat', 'damon_bass', 'scottyhubs', 'blisianna', 'owen_pierard03', 'ferrarizoee', 'juliebean69', 'lilyfal123', 'cwallace966', 'hayley.mw', 'bourbonpursuit', 'bigjuicers', '_prince.cosplayss_', 'mykenarae', 'hoodmeals', 'honeybobabear', 'alyssalynn120', 'thebomb602', 'thatsjacked', 'kushmamii', 'karimsalmen', 'pengluoshi', 'knight_thepit', 'the.dean.dome', 'wattswrld', 'kayleewillyams', 'salinakilla', 'magical_liquid', 'trulyboyjojo', 'erndurf', 'pressleyhosbach', 'dabeetle_', 'julietteweg', 'amyworek', '10.07am', 'pheebzlangwell', 'aliyatudisco', 'xchechinx', 'gnb.official', 'roncoxjr', 'match.making16', 'captin_jack', 'madison_olds', 'lancali', 'elizzle69420', 'tiktikfriend', 'wes_dogg', 'mark.gzs', 'agowelss', 'shippo011', 'nene_la_shiro', 'mystripclub', 'zavthefunnyguyy', 'ballsaq_', 'sam.iam.iykyk', 'jrzl', 'rachie.love', 'capnhook', 'spicegoddess_', 'bradleymick', 'yeahimcaroline', 'quitethedilemma', 'alyssa.loves.soccer', 'calculatingmemes', 'lilsmize', 'madieeee21', 'elxaviichulo', 'thenickdrivas', 'ameliaissocool2', 'rebekah.legault', 'katiefeeneyy', 'aidenakillian', 'notgracerichardson', 'funnylifeanne', 'austinmarieclaire', 'daveyrz', 'j.phillipe', 'kargen_graves', 'actualhummus', 'definitely_not_cj', 'johnbarnes71', '.mayton', 'carocircle_', 'dealmeida.dylan', 'friendcheskaa', 'sweetcarolineofficial', 'suexrose', 'zach_jonez', 'yoonbumshitfillediaper', 'lbeavs', 'sarahisabe11', 'diana__darling', 'hannah.montee', 'wallahi.zxvh', 'gondrethewordsmith', 'briianna.truss', 'laurasu90', 'iclaim1111', 'tateova15', 'sheliamarie87', 'frizzandfrillzz', 'i.love.avocados.yo', 'suxysueee', 'crushinit', 'beckkybeckkismyboo', 'hershey.20', 'j0haun_', 'drewhacks', 'redheadrap', 'mariesam', 'acidmontana69', 'bryanduran100', 'locuras_de_bibis', 'mackymoore', 'loveinamovie', 'emmacruz86', 'alee_babee_', 'emilyeet3', 'meme.vault', 'garrettmccraw', 'peach.aesthxtics._', 'hailey.jr', 'hawttopicblog', 'daddygus99', 'closedonsunday', 'victorcreed9000', 'nigelzap', 'biggdracco', 'gabxxrielle', 'saanjaliuchiha', 'ohkai_', 'nianneart', 'gunnardeatherage', 'daily.dose.of.molly', 'iwilleaturchildsohideit', 'moozeszn', 'kenmalovesmeee', 'feminaziii', 'awkward_als', 'jon.29k', 'goobybearco', '4pfjulio', 'zodiac.signs.1.3', 'angelica.and.devan', 'fairhopeherps', 'dobbysock1', 'itsjenguin', 'chezaidan', 'brianboorom', 'kaylynn..wood', 'bumnbummer', '_ms_frost_', '123go', 'tshinnn', 'tatumgraygubler', 'autumn_r821', '1jolly1', 'gold_caviar', 'half_and_bad_ass', 'nickyimeneo', 'amandarolll', 'rhettroach', 'mynameissreese', 'mc.clipsnmemes', 'veecossio', 'amongus__lmao', 'dreavazquez', 'officialhambly', 'zayda_world', 'ryn_brannock', 'jayyddubs', 'someonecallmiles', 'jewishrepublican', 'kthuntley', 'johnstone.gregory', 'youthpastorryan', 'mireyarios', 'annagaribay28', 'beautycreate', 'ritzy.ralph', 'gotdatpressure', 'braxtonnncomerrr', 'logannn.01', 'katherine.krecioch', 'kingcarlx', 'darrelljoness', 'doitkentt', 'giathechia', 'avawhiting', 'savy165', 'nathan.evans13', 'itz.jordxn', 'scout_is...awesome', 'michael_winner21', 'thejackpayne', 'yourlocalpoolboy', 'itsjustbrendan', 'landenpurifoy', 'cadenaylward', 'tjnessy2.0', 'adampukeonhaters', 'jmillerb15', 'chadbackinhouston', 'imprettypogg', 'cookingwithshereen', 'oscarchenn', 'adimeplusninetynine', 'jaylamelt', 'thefurrhafamily', 'erierieri117', 'payton.herbert', 'animalsdoingthings', 'spookidooki', 'kylieking68', 'nutcrackercollector', 'justyngee', 'jackkp1999', 'yasmanian_devil', 'justincarpioo', 'notcarsonmckenzie', 'campuzanoabelardo', 'myjoystory', 'jettsetfarmhouse', 'taylizbeth', 'rohanramdin', 'sidclusive', 'bumperbully.spliff', 'havefaith1012', 'kevsadik', 'gabrielle_moses1', 'actressbecc', 'yoadrienne8809', 'rescos', '_evelynjuarez16', 'detectivemom0', 'juanzla', 'nasbruh_gaming', 'mxriyum', 'chloecssweets', 'victoryrhyder', '5.minute.crafts', 'taylaycay', 'mosthated.jaaaay', 'wubzzy69', 'ifunot1stulast', 'ashmyersdesigns', 'liviikleinnnn', 'xtylersu23', 'joaquin3x', '_mediaclips._', 'wolvite', 'globbles..satisfication', 'brendan_ferraro', 'heytonytv', 'king_victober', 'jordynsugarrr', 'adrienneeramirez', 'yeseniagarcia43', 'thepitmansisters', '_brianchu', 'discovery', 'badgirlmiimii', 'shambio', 'treyfoundjules', 'wheezyfitness2.0', 'athenalayna', 'jakeross2001', 'hayden_shipley', 'phantom_strike06', 'sanfranciscosun', 'fear_nothin', 'kiannakween', 'biggie_chub', 'danielcharlesmckay', 'berniegzz', 'alexanderclipper', 'jesuecondom', 'soflofooodie', 'boogerprincess', 'lovbuq', 'mxriahtixra', 'gethollr', 'yordang_xo', 'kennedyccurtis', 'bbgxo20', 'miammarquez', 'prudence2277', 'mmyllahh.h', 'mattoliver22', 'citr.io_official', 'saebunny', '.johng', 'savannahmarable', 'sodesofie', 'katrinastigers', 'ancasterdq', 'dixiejewell', 'fesssl', 'sarasmileslots', 'jakeypoov', 'niki_olsen', 'tesah7777', 'yeehaw_meg', 'missfranklinsfirsties', 'leafseed', 'missfits3000', 'mrsimpsexual', 'fknjunior', 'brennie88', 'natalie.papaevangelou', 'thatdettypig0', 'asiancubbs', 'salvatore186417', 'iijuscallherredd', 'nutritionbabe', '.gotham.city', 'shopwillbeauty', 'chloebluffcakes', 'jakerastatter', 'mikezuffante7', 'abby.mitchell04', 'michael_styles', 'megkeaveney', 'thejayders1', 'bearded_jay', 'brucerants', 'firefist_37', 'themichaelpepito', 'michfleish', 'ihateranch', 'kevwhaledog', 'prxncess.lyiia', 'nikadegagne', 'tylerlopez76', 'cyruslogan11', 'drakelberry', 'freaks4dayz', 'joshbutlertv', 'akidnamedjustin', 'papishampoo.tv', 'nkaun', 'jordanfoulk', 'carrieberkk', 'mayraaarelii', 'joe46biden2020', 'ckaguila', '_coralrodriguezzz', 'idiotenergy', 'hawk.chelsea', 'iamkengi1', 'eight_fluffytails', 'charstyleo', 't.a.t.i.a.likeu', 'androalpha.pancake', 'chelitaxo', 'mrs.bench', 'charxstyle', 'janaestewartt', 'papi.jeffy69', 'cookingbomb', 'tatisaf', 'themadivlog', 'ulovezay', 'theofficialmemehub.com', 'morgan.theweeb', 'psy.fox', 'stephsquared', 'lukedavidson_', 'kelseyvenkov', 'jamanilopez', 'leila..weasley', 'thetrifectalove', 'rachelkuperman', 'n3onsingh', '_cyansus', 'megan.pendleton', 'mialanaterry', 'umbrellaheights', 'supes', 'k2sneaks', 'coffeefanatics', 'tyandem', 'vlone.smb', 'ryuzakiirl', 'viva.valentina', 'anthonyandcody', 'miiirandamusic', 'gkuhlenschmidt', 'jake.251', 'elianaghen', '_sadoe_', 'nannymaw', 'xry.7', 'notvicc', 'justwolow', 'kylethecreator772', 'spicybear1', 'hailiedeegan', 'justbryang', 'ilovepawpatrol69', 'steezyswizz', 'marissa.wilkes', 'n0tsvetlana', 'dunk', 'meekathehusky', 'fantasyfreaks', 'dadabod', 'zoeeoliviaa_', 'josh_hill_99', 'nailartgirlist', 'alyssa.kostrzewa', 'your_nicole', 'abiiiijjjjj', 'ranboolive', 'wontomsoup', 'tripsennn', 'liljayj', 'flights23whites', 'marvin4eva33', '.carsonglover6', 'squish.and.co', 'nicolepetrie', 'officialdavidcoto', 'sydney.macalpine', 'brittanilancaster', 'youdontknowlily', 'maryyisabel', 'kayleebod', 'hotbishtish', 'ladyefron', 'cassidy__t', 'rauld33', 'bryan_jinn', 'crys_ct818', 'mtfoxx3', 'kageyamasmilk.9', 'theunclothed', 'edenm043', 'laurel.gilchrist', 'alexhdez__', 'khushalakbari2021', 'justinbejolly', 'mothcleo', 'dennyboiii', 'jqxuan004', 'pearlwhite.frs', 'emilyzielechowski', 'clxtchupdell', 'natecheslog', 'vickyyyy_priv', 'dolka5oficial', 'uncleganggang', 'sheluvdae', 'jiggysawgirl', 'ierlynn', 'cimorelliband', 'toohightohandle', 'allluv999', 'logandekker', 'ellenoreshoto', 'yerawizard_arry', 'dadlifejason', 'caitlynjoymendoza', 'poodlepeeps', 'yuumitunes', 'staffzy', 'booanditsythejrs', 'your_person_quotes', 'diamondk247', 'kountryblackofficial', 'pugist420', 'mikay.g', 'jesusacevedox43', 'emilygracenestman', 'cindychendesigns', 'ian.farrington', 'bumoparent', 'helloginadarling', 'champ_dawgie', 'kamreyrey', 'soyluzzo', 'thesophialiu', 'tacoswithhorchata', 'thesignsbyisa', 'mysteryblindbags2', 'itsjustgalvin', 'vivsies', 'hlkj0', 'larry_obsessed', 'perfumetiktok', 'junahgaryandmischief', 'harryxstylez5', 'ziggybadmon', 'billykeeble', 'theboysof98', 'finnishbrat', 'mcchokeme2.0', 'onemaybeauty', 'seyy.maiga', 'misskaiixo', 'delo.n', 'kosherplug', 'runvfx', '3headedgoats1', 'emilie_20_hudson', 'carlos_aguilar', 'giannapriolo6', 'scoopofsherbet', 'traderjoes.com', 'tiktalkshoww', '_gatorgirl', 'spenceraitken', 'briannabealand7', 'cougar.ioo', 'psychicel', 'taylorburger16', 'nicole_thenomad', 'kkendrajones', 'catsncoffee', 'evenouttwins', 'hailey.pirker', 'duke.gomez', 'moose_0', 'abigaillbare', 'mr_hoppy33', 'briarmaynard', 'asiapaole', 'aiden2wallace', 'mistle.tok', 'rerock99', 'i.love.tom.holland', 'okayjeremyy', 'mcsquared90', 'alexisbenson0', 'jessaastrid', 'musingwmads', 'peterspasta', 'daddyslittlegurllll', 'tatianawinton', 'ajnugent_', 'frankiefrancic', 'therealvapetrek', 'wlj8886', 'nun.yuh.business', 'lovercandy001', 'jackiegansky', 'davidbeck05', 'bradshear', 'vawerie', 'blackladder', 'theakatsukiofpain', 'novakowitch', 'm0llywhore420', 'serge_therussian', 'uglyahhfatguy', 'mali.nalli', 'drmichaelvan', 'trespassers5', 'coffeebae97', 'sj_rachel', 'yuji_glynn', 'alexisafterdark', 'treyxvone', 'okanjie', 'zozoroe', 'makaylabaileyyyy', 'brielle_faith', 'abbiewilliams0102', 'ericjones1010', 'lilxxxbug', 'addyishere', 'pirateking69', 'kaylamalecc', 'crvsh911', 'ajbonares', 'itsdyay', 'b.dontdopretty', 'cherrytomato97', 'reynarassouli', 'matthew_divirgilio', 'austinmorris07', 'bon.bon.voyage', 'freshcutdancer', 'the.og.ariel', 'iammarxx', 'abbywrenartistry', 'girlwitharunningwatch', 'thedeathscorts', 'shnixxy', 'depressiontingzz', 'witdad', 'letmeknowcoco', 'realmena', 'magensmenu', 'vangor03011995', 'nikkkiii_l', 'sarahkordyban', 'babyjass777', 'trektrash', 'jaymuneediy', 'ucnick_', 'brandonk.achi', 'haleygarrett2011', 'peter_vigilante', 'samandlona', 'sasukesmashed', 'freedomdundalk', 'okdxzo', 'georgieporgietiktok0', 'lailaraylene.com', 'taylorcampbellofficial', 'dezzisaenz', 'dontstopmeowing', 'uh.oh.lil.stinker', 'tinleeeyyy', 'itzme.drey', 'lighterboy24', 'cattiea', 'housesdaily', 'itsnotthathardtonotsayit', 'stefanocher', 'axxtin', '900bees', 'jauucy', 'among_.ussssss._', 'livx0xo', 'welcometomoes2', 'glit2319', 'avmoskwa', 'briar.l.may', 'edenvonweiss', 'diamond_marvin', 'tiktokketo', 'superxtra', 'funkyfitz', 'mayapuhpaya', 'connor.tanner', 'tinisimpsforaddison', 'levaboy36', 'christyleefit', 'spleengod', 'its.rebeccaking', 'amberbeede', 'jambreezyy', 'starboyblue', 'lynlapid', 'agatherenou', '.juhcobo', 'zacho_franko', 'lolajacoby', 'jacob.coyne', 'ingenuegothic', 'youngnigerianprince1', 'aaronscullyy', 'katelyn_aguilera', 'themacthatsmilesback', 'iisaacharrisonn', 'mrfreesh', 'maria.ahmedd', 'ozanwiththejokes', 'abrameng', 'moda2000inc', 't1nker47', 'shereinabdelhady', 'sammyg15', 'adooru', 'dutchessprim', 'zar.r', 'yolkfather', 'solange.sugawara', 'thesavbananas', '....greg', 'jessica_salaxar', 'spencer.horne', 'jacobalmashy', 'rodtoofamous', 'haileeandkendra', 'clairecarolynn', 'vampirediaries.09', 'aub.layton', 'th0t5_4_1d', 'anna.katherinee', 'veryshinyrocks', 'ellenroseo', 'donkieee', 's.emilys', 'circumcisedtoenail', 'dat1family', 'bigorbetter', 'hungryhotline', 'i_am_whiskey', 'deeluney', 'calebhearnmusic', 'betamejia', '2001_toyota_corolla', 'simonemarvalofficial', 'jadenspencr', 'thesandyandthesalty', 'errk542', 'samanthamerklin', 'haydenjweberrr', 'dahlyuhh', 'omsivayaspam', 'gagliogiuliaa', 'just_jas_things', 'coop.daddyy', 'bethh.any', 'morganskriba', 'cheetaprint.wh0re', 'currenshes', 'nashalynails', 'scootayd', 'melllyyt', 'livdady6', 'ijustthinkitsfunnyhow', 'garrettjenkins19', 'joey_pizzica', 'sofiahlii', 'derekskits', 'jannehkonneh', 'erikjohn93', 'mellymartinez01', 'tonefrance', 'baddi21_', 'suidxe', 'kid.carson', 'sarahsharafff', 'bigsimpanimewhore', 'hollowqxween', 'thesarahtaylor', 'roydubois_', 'kaylanutty', 'mixolochefsteph', 'smitherenes', 'bellabuonocore', 'bellyvmtz', 'hunt3rpifer', 'evwangg', 'angel.payton.jh', 'megmeg_609', 'super_melon_man', 'jojoloranne', 'jstkara', '5.7_king', 'thatslimguyjl', 'gib0_', 'naomiskyex', 'davechappellehd', 'justlaughman0', 'aidansteinbach', 'mariah.cecelia', 'k.ing_k.yle', 'caitlynisabella', 'michele_kissane', 'antxana', 'sincerely_hank', 'nkunim', 'dan.henry22', 'bartendermom', 'katherineabel2', 'complex', 'bloos_baby_', 'danyyyani', 'thelolodee', 'electric.cowgirl', 'eesha.613', 'wyattthegsp', 'papi_dre1', 'professional_he11_h00ker', 'aboomin', 'grwm..vibes08', '_hannahdolmat', 'analiscruzx', 'mrslukeslab', 'daddychill_pedro', 'kathyamaldonado3', 'monkeymanfart', 'isiteverokay', 'thekingofdiet', 'tristanbvibin', 'greenexpertmen', 'not.kyleigh.boo', 'lamaletaliviana', 'kacustoms', 'bbarrontrump', 'bananas.gov', 'xomalaynamarie', 'grantzoldyck', 'partaytay18', 'hollis.stur', 'shaunafullen', 'saucyaj_', 'jroboe', 'corinamalfoys', 'hisokasbungeegum111', 'pierce_woodward', 'leftshoes', 'pewdiepie_daily', 'greysbaes', 'issavibe111', 'marymullaneee', 'sixslowstan', 'sweetmiseryxo', 'mabumecca', 'simpkingnation', '..stephan', 'betstir', 'catejjfish', 'harrypotter_fandom9', 'c.j112', 'maegan_lemons', 'hargymania', 'allthingscomedy', 'blogilates', 'andreswxr', 'fluffyface_enzo', 'moneymo_21', 'lexxhidalgo', 'itsmecpg', 'karanshaah', 'trickshot_ceo', 'uhhjacobbbb', 'candyshopbabyy', 'alluringskull', 'ryiscool0', 'hadaraaiello', 'yurmally', 'skyla.lynne', 'bullrider1335', 'nightnurse00', 'iamelinewell', 'bluesbirb', 'cforchase', 'aline.abby1', 'sagekage_', 'msbeanieofficial', 'gonzade', 'therepublicanhypehouse', 'lifestylewithz', 'addiestraka20', 'public_mischief', 'alexandra_02103']
dicts={}
for n in names:
    dicts[n]=Counter()
for fname in os.listdir('D:\\Work\\Tool\\tiktok\\TikToks\\'):
    if not fname.endswith('.json'):
        continue
    if not (fname.lower().startswith('hashtag')):
        continue
    ht=fname.split('_')[1]
    with open('D:\\Work\\Tool\\tiktok\\TikToks\\'+fname, 'r', encoding='utf-8', newline='\n') as filename_input:
        i=0
        for line in filename_input:
            z = json.loads(line)
            if 'authorInfos' in z.keys():
                if z['authorInfos']['uniqueId'] in names:
                    if ht in dicts[z['authorInfos']['uniqueId']]:
                        dicts[z['authorInfos']['uniqueId']][ht]+=1
                    else:
                        dicts[z['authorInfos']['uniqueId']][ht]+=1
            elif 'author' in z.keys():
                if z['author']['uniqueId'] in names:
                    if ht in dicts[z['author']['uniqueId']]:
                        dicts[z['author']['uniqueId']][ht]+=1
                    else:
                        dicts[z['author']['uniqueId']][ht]+=1
            i+=1
            if i>500:
                break
for n in dicts.keys():
    print(n,dicts[n])